/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.trade;

import com.enation.app.javashop.client.trade.AfterSaleClient;
import com.enation.app.javashop.core.client.fallback.trade.AfterSaleClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.aftersale.dos.RefundDO;
import com.enation.app.javashop.model.aftersale.vo.ApplyAfterSaleVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 售后client feign实现
 * @author kingapex
 * @version 1.0
 * @since 7.1.0
 * 2020/4/9
 */
@FeignClient(name = "trade-service", fallbackFactory = AfterSaleClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface AfterSaleClientFeignImpl extends AfterSaleClient {

    @Override
    @PutMapping("/client/after-sale/order/{order_sn}/cancel")
    void cancelPintuanOrder(@PathVariable("order_sn") String orderSn, @RequestParam("cancel_reason") String cancelReason);

    @Override
    @GetMapping("/client/after-sale/service/{service_sn}")
    ApplyAfterSaleVO detail(@PathVariable("service_sn") String serviceSn);

    @Override
    @GetMapping("/client/after-sale/refund/{service_sn}")
    RefundDO getAfterSaleRefundModel(@PathVariable("service_sn")String serviceSn);

    @Override
    @GetMapping("/client/after-sale/refund-completion")
    void refundCompletion();

    @Override
    @PutMapping("/client/after-sale/shop/{shop_id}/name")
    void editAfterSaleShopName(@PathVariable("shop_id")Long shopId, @RequestParam("shop_name")String shopName);
}
